<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:fn="http://java.sun.com/jsp/jstl/functions"
	xmlns:form="http://giava.by/common/form">

	<c:if test="#{empty code}">
		<c:set var="code" value="EUR" />
	</c:if>
	
	<c:if test="#{empty required}">
		<c:set var="required" value="false" />
	</c:if>
	
	<c:if test="#{empty rendered}">
		<c:set var="rendered" value="true" />
	</c:if>
	
	<c:if test="#{empty disabled}">
		<c:set var="disabled" value="false" />
	</c:if>

	<h:inputText id="#{id}" value="#{value}" required="#{required}"
		disabled="#{disabled}" rendered="#{empty rendered ? true: rendered}"
		converter="javax.faces.BigDecimal" styleClass="currency #{styleClass}"
		style="text-align: right; #{style}"
		maxlength="#{empty maxlength ? 18: maxlength}"
		onkeypress="return currencyFormat(event);">
		<f:convertNumber type="currency" maxFractionDigits="2"
			pattern="###0.00" locale="it" />		
			<ui:insert />
	</h:inputText>

</ui:composition>









